#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
      int A;
      int B;
      int C;
      cin >> A >> B >> C;
      cout << ((((A < 0)&&(B < 0))&&(C > 0))||(((A < 0)&&(C < 0))&&(B > 0))||(((B < 0)&&(C < 0))&&(A > 0)));

    return a.exec();
}
